/**
 * @description 计时记录模型类
 * @author AI Assistant
 * @date 2023-10-27
 */

import { BaseModel } from './base'

export class TimerRecord extends BaseModel {
  constructor(data = {}) {
    super(data)
    this.taskId = data.taskId || ''
    this.type = data.type || 'normal'
    this.startTime = data.startTime || 0
    this.endTime = data.endTime || 0
    this.duration = data.duration || 0
    this.notes = data.notes || []
  }

  toJSON() {
    return {
      ...super.toJSON(),
      taskId: this.taskId,
      type: this.type,
      startTime: this.startTime,
      endTime: this.endTime,
      duration: this.duration,
      notes: this.notes
    }
  }
} 